home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / f90 / digits.z / digits
Encoding:
Text File  |  1998-10-30  |  2.7 KB  |  89 lines

  1. DIGITS(3I)                                             Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      DDIIGGIITTSS - Returns the number of significant digits
  6.  
  7. SSYYNNOOPPSSIISS
  8.      DDIIGGIITTSS (([XX==]_x))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS, UNICOS/mk, and IRIX systems
  12.  
  13. SSTTAANNDDAARRDDSS
  14.      Fortran 90
  15.  
  16. DDEESSCCRRIIPPTTIIOONN
  17.      The DDIIGGIITTSS intrinsic function returns the number of significant digits
  18.      in the model representing numbers of the same type and kind type
  19.      parameter as the argument.  The number returned is the number of
  20.      significant radix digits (base 2 digits), not decimal digits.  It
  21.      accepts the following argument:
  22.  
  23.      _x    Must be of type integer or real.  It can be scalar or array
  24.           valued.
  25.  
  26.      DDIIGGIITTSS is an inquiry function.  The name of this intrinsic cannot be
  27.      passed as an argument.
  28.  
  29. RREETTUURRNN VVAALLUUEESS
  30.      The result type is an integer scalar.  The result has the value _q if _x
  31.      is of type integer.  It has the value _p if _x is of type real.  The
  32.      values _q and _p are defined on the MMOODDEELLSS(3I) man page.
  33.  
  34. EEXXAAMMPPLLEESS
  35.      The following code fragment was run on several systems:
  36.  
  37.           INTEGER(KIND=1) i1
  38.           INTEGER(KIND=2) i2
  39.           INTEGER(KIND=4) i4
  40.           INTEGER(KIND=8) i8
  41.           INTEGER id
  42.           PRINT *,'DIGITS i1=',DIGITS(i1)
  43.           PRINT *,'DIGITS i2=',DIGITS(i2)
  44.           PRINT *,'DIGITS i4=',DIGITS(i4)
  45.           PRINT *,'DIGITS i8=',DIGITS(i8)
  46.           PRINT *,'DIGITS id=',DIGITS(id)
  47.           END
  48.  
  49.      IRIX systems generated the following results:
  50.  
  51.           DIGITS i1= 7
  52.           DIGITS i2= 15
  53.           DIGITS i4= 31
  54.           DIGITS i8= 63
  55.           DIGITS id= 31
  56.  
  57.      CRAY T90 systems that support IEEE floating-point arithmetic generated
  58.      the following results:
  59.  
  60.           DIGITS i1= 7
  61.           DIGITS i2= 15
  62.           DIGITS i4= 31
  63.           DIGITS i8= 63
  64.           DIGITS id= 63
  65.  
  66.      UNICOS systems, except for CRAY T90 systems that support IEEE
  67.      floating-point arithmetic, generated the following results:
  68.  
  69.           DIGITS i1= 7
  70.           DIGITS i2= 15
  71.           DIGITS i4= 31
  72.           DIGITS i8= 63
  73.           DIGITS id= 63
  74.  
  75.      UNICOS/mk systems generated the following results:
  76.  
  77.           DIGITS i1= 7
  78.           DIGITS i2= 15
  79.           DIGITS i4= 31
  80.           DIGITS i8= 63
  81.           DIGITS id= 63
  82.  
  83. SSEEEE AALLSSOO
  84.      MMOODDEELLSS(3I)
  85.  
  86.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
  87.      printed version of this man page.
  88.  
  89.